#ifndef _STAT_H
#define _STAT_H

#include "types.h"
#include "fs_file.h"
#include "fat32.h"
#define T_DIR     1   // Directory
#define T_FILE    2   // File
#define T_DEVICE  3   // Device
#define STAT_MAX_NAME 32
struct stat_fs {
  char name[STAT_MAX_NAME + 1];
  int dev;     // File system's disk device
  uint ino;    // Inode number
  short type;  // Type of file
  short nlink; // Number of links to file
  uint64 size; // Size of file in bytes
};

void estat(struct dirent *entry, struct stat_fs *st);
/*
int filestat(struct fs_file *f, uint64 addr);
*/
#endif